<cfcomponent extends="assets.calgrants.com.Base">

	<cffunction name="call" access="public" output="false" returntype="any">
		<cfargument name="sp" required="true" />
		<cfset var result = "">
		<cfstoredproc datasource="#getDatasource()#" procedure="#arguments.sp#">
			<cfswitch expression="#arguments.sp#">
				<cfcase value="getDuplicateEmails">
					<cfprocparam value="#arguments.Email#" cfsqltype="CF_SQL_VARCHAR" null="false" />
				</cfcase>
				<cfcase value="getNextWorkshopDate">
					<cfprocparam value="#arguments.Organization_ID#" cfsqltype="CF_SQL_INTEGER" null="false" />
				</cfcase>
				<cfcase value="authUser">
					<cfprocparam value="#arguments.User_ID#" cfsqltype="cf_sql_integer" null="#IIf(Len(Trim(arguments.User_ID)) gt 0, false, true)#" /> 
					<cfprocparam value="#arguments.Email#" cfsqltype="cf_sql_varchar" null="#IIf(Len(Trim(arguments.Email)) gt 0, false, true)#" /> 
					<cfprocparam value="#arguments.Password#" cfsqltype="cf_sql_varchar" null="#IIf(Len(Trim(arguments.Password)) gt 0, false, true)#" /> 
					<cfprocparam value="#arguments.Program_Year#" cfsqltype="cf_sql_varchar" null="false" /> 
				</cfcase>
				<cfcase value="validateClaim">
					<cfprocparam value="#arguments.Claim_ID#" cfsqltype="cf_sql_varchar" null="#IIf(Len(Trim(arguments.Claim_ID)) gt 0, false, true)#" /> 
				</cfcase>
				<cfcase value="authScholar">
					<cfprocparam value="#arguments.Scholarship_ID#" cfsqltype="cf_sql_integer" null="#IIf(Len(Trim(arguments.Scholarship_ID)) gt 0, false, true)#" /> 
					<cfprocparam value="#arguments.Email#" cfsqltype="cf_sql_varchar" null="#IIf(Len(Trim(arguments.Email)) gt 0, false, true)#" /> 
					<cfprocparam value="#arguments.Password#" cfsqltype="cf_sql_varchar" null="#IIf(Len(Trim(arguments.Password)) gt 0, false, true)#" />
					<cfprocparam value="#arguments.Claim_ID#" cfsqltype="cf_sql_varchar" null="#IIf(Len(Trim(arguments.Claim_ID)) gt 0, false, true)#" /> 
				</cfcase>
				<cfcase value="getExitSurveyChartData">
					<cfprocparam value="#arguments.workshopIDs#" cfsqltype="cf_sql_varchar" null="#IIf(Len(Trim(arguments.workshopIDs)) gt 0, false, true)#" /> 
					<cfprocparam value="#arguments.organizationIDs#" cfsqltype="cf_sql_varchar" null="#IIf(Len(Trim(arguments.organizationIDs)) gt 0, false, true)#" /> 
					<cfprocparam value="#arguments.regionIDs#" cfsqltype="cf_sql_varchar" null="#IIf(Len(Trim(arguments.regionIDs)) gt 0, false, true)#" /> 
				</cfcase>
				<cfcase value="searchHighSchools">
					<cfprocparam value="#arguments.searchString#" cfsqltype="cf_sql_varchar" null="#IIf(Len(Trim(arguments.searchString)) gt 0, false, true)#" /> 
				</cfcase>
				<cfcase value="autocompleteCity">
					<cfprocparam value="#arguments.term#" cfsqltype="cf_sql_varchar" null="#IIf(Len(Trim(arguments.term)) gt 0, false, true)#" /> 
				</cfcase>
				<cfcase value="getSurvey">
					<cfprocparam value="#arguments.Survey_ID#" cfsqltype="cf_sql_integer" null="#IIf(Len(Trim(arguments.Survey_ID)) gt 0, false, true)#" />
					<cfprocparam value="#arguments.Survey#" cfsqltype="cf_sql_varchar" null="#IIf(Len(Trim(arguments.Survey)) gt 0, false, true)#" />
				</cfcase>
				<cfcase value="logScholarOrientationCompleted">
					<cfprocparam value="#arguments.Claim_ID#" cfsqltype="cf_sql_varchar" null="false" />
				</cfcase>
				<cfcase value="logMobileFacebookLike">
					<cfprocparam value="#arguments.URL#" cfsqltype="cf_sql_varchar" null="false" />
				</cfcase>
				<cfcase value="getChampion">
					<cfprocparam value="#arguments.Token#" cfsqltype="cf_sql_varchar" null="false" />
				</cfcase>
				<cfcase value="getGDSMatchingData">
					<cfprocparam value="#arguments.Program_Year#" cfsqltype="cf_sql_varchar" null="false" /> 
				</cfcase>
				<cfcase value="getScholarshipCounts">
					<cfprocparam value="#arguments.Program_Year#" cfsqltype="cf_sql_varchar" null="#IIf(Len(Trim(arguments.Program_Year)) gt 0, false, true)#" />
					<cfprocparam value="#arguments.Workshop_ID#" cfsqltype="cf_sql_integer" null="#IIf(Len(Trim(arguments.Workshop_ID)) gt 0, false, true)#" />
					<cfprocparam value="#arguments.Site_ID#" cfsqltype="cf_sql_integer" null="#IIf(Len(Trim(arguments.Site_ID)) gt 0, false, true)#" />
					<cfprocparam value="#arguments.Organization_ID#" cfsqltype="cf_sql_integer" null="#IIf(Len(Trim(arguments.Organization_ID)) gt 0, false, true)#" />
					<cfprocparam value="#arguments.County_ID#" cfsqltype="cf_sql_integer" null="#IIf(Len(Trim(arguments.County_ID)) gt 0, false, true)#" />
					<cfprocparam value="#arguments.Region_ID#" cfsqltype="cf_sql_integer" null="#IIf(Len(Trim(arguments.Region_ID)) gt 0, false, true)#" />
				</cfcase>
				<cfcase value="getOrderCounts">
					<cfprocparam value="#arguments.Program_Year#" cfsqltype="cf_sql_varchar" null="#IIf(Len(Trim(arguments.Program_Year)) gt 0, false, true)#" />
					<cfprocparam value="#arguments.Deleted#" cfsqltype="cf_sql_bit" null="#IIf(Len(Trim(arguments.Deleted)) gt 0, false, true)#" />
					<cfprocparam value="#arguments.Organization_ID#" cfsqltype="cf_sql_integer" null="#IIf(Len(Trim(arguments.Organization_ID)) gt 0, false, true)#" />
					<cfprocparam value="#arguments.County_ID#" cfsqltype="cf_sql_integer" null="#IIf(Len(Trim(arguments.County_ID)) gt 0, false, true)#" />
					<cfprocparam value="#arguments.Region_ID#" cfsqltype="cf_sql_integer" null="#IIf(Len(Trim(arguments.Region_ID)) gt 0, false, true)#" />
				</cfcase>
				<cfcase value="getUnorderedWorkshops">
					<cfprocparam value="#arguments.Program_Year#" cfsqltype="cf_sql_varchar" null="#IIf(Len(Trim(arguments.Program_Year)) gt 0, false, true)#" />
					<cfprocparam value="#arguments.Organization_ID#" cfsqltype="cf_sql_integer" null="#IIf(Len(Trim(arguments.Organization_ID)) gt 0, false, true)#" />
				</cfcase>
			</cfswitch>
			<cfprocresult name="result" />
		</cfstoredproc>
		<cfreturn result />
	</cffunction>
	
</cfcomponent>